package ${sourceBasePackage}.api;

import com.idp.common.model.JsonModel;
import ${sourceBasePackage}.dto.${entityName}Dto;
import ${sourceBasePackage}.dto.${entityName}SearchDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ${description}API
 * @author ${author}
 */
@Api(tags="${description}API")
@RequestMapping("/api/${entityName?uncap_first}/")
public interface ${entityName}Api {

	/**
	 * 分页查询
	 * @param ${entityName?uncap_first}SearchDto
	 * @return
	 */
	@ApiOperation(value="分页查询")
	@PostMapping("/findByPage")
	JsonModel findByPage(@RequestBody ${entityName}SearchDto ${entityName?uncap_first}SearchDto);

	/**
	 * 通过id查询
	 * @param ${entityName?uncap_first}Dto
	 * @return
	 */
	@ApiOperation(value="通过id查询")
	@PostMapping("/getById")
	JsonModel getById(@RequestBody ${entityName}Dto ${entityName?uncap_first}Dto);

	/**
	 * 新增
	 * @param ${entityName?uncap_first}Dto
	 * @return
	 */
	@ApiOperation(value="新增")
	@PostMapping("/add")
	JsonModel add(@RequestBody ${entityName}Dto ${entityName?uncap_first}Dto);

	/**
	 * 修改
	 * @param ${entityName?uncap_first}Dto
	 * @return
	 */
	@ApiOperation(value="修改")
	@PostMapping("/update")
	JsonModel update(@RequestBody ${entityName}Dto ${entityName?uncap_first}Dto);

	/**
	 * 删除
	 * @param ${entityName?uncap_first}Dto
	 * @return
	 */
	@ApiOperation(value="删除")
	@PostMapping("/delete")
	JsonModel delete(@RequestBody ${entityName}Dto ${entityName?uncap_first}Dto);

}
